package my.project.ribboon.controller;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import my.project.ribboon.service.ComputeService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by 哲 on 2016/11/29.
 */
@RestController
public class ComputeController {

    private static final Logger logger = Logger.getLogger(ComputeController.class);

    @Autowired
    ComputeService computeService;

    @RequestMapping(value = "/add", method = RequestMethod.GET)
    public String add(){
        logger.info("controller /add, ribbon 负载调用");
        return computeService.addService();
    }

}
